{include file="public/header" /}
<style type="text/css">
    #des, #des input {
        width: 40px;
        text-align: center;
    }

    #id {
        width: 78px;
    }

    .bs-checkbox {
        width: 36px;
        height: 40px
    }

    .fixed-table-toolbar .columns, .fixed-table-toolbar .search {
        margin-left: 0px;
        margin-top: 0px
    }

    #title span {
        float: right;
    }

    .btn-active {
        background: #1ab394;
        color: #fff
    }
</style>
<body class="gray-bg">
<div class="wrapper wrapper-content">
    <div class="ibox float-e-margins">
        {include file="public/tophead"}
        {include file="public/top" /}
        <div class="ibox-content">
            <div class="row row-lg">
                <div class="col-sm-12">

                    <div style="display:block;clear: both;"></div>
                    <div class="fixed-table-toolbar">
                        <form method="get" action="">
                            <div class="pull-left search">
                                <div class="columns columns-right btn-group pull-left">
                                    <select class="form-control" name="field">
                                        <option value="name" selected="selected">名称</option>
                                        <option value="desc">描述</option>
                                    </select>
                                </div>
                                <div class="pull-right search">
                                    <button style="border-radius:0px; border:1px solid #e5e6e7; border-left:0px"
                                            class="btn btn-default btn-outline" type="submit">搜索
                                    </button>
                                </div>
                                <div class="pull-right search">
                                    <input class="form-control input-outline" type="text" name="text" value="{:input('get.text', '')}" />
                                </div>
                            </div>
                        </form>
                    </div>
                    <div class="example">
                        <form class="form-horizontal" method="post">
                            <table data-toggle="table">
                                <thead>
                                    <tr>
                                        <th data-align="center">ID</th>
                                        <th data-align="center">名称</th>
                                        <th data-align="center">级别</th>
                                        <th data-align="center">描述</th>
                                        <th data-align="center">推荐</th>
                                        <th data-align="center">时间</th>
                                        <th>管理</th>
                                    </tr>
                                </thead>
                                <tbody id="form">
                                    {volist name="data" id="v"}
                                    <tr id="id{$v.id}" class="class">
                                        <td>{$v.id}</td>
                                        <td>{$v.name}</td>
                                        <td>{$v.level}</td>
                                        <td>{$v.desc}</td>
                                        <td>{if condition="$v.is_red"}是{else /}否{/if}</td>
                                        <td>{$v.update_time|date='Y-m-d H:i:s'}</td>
                                        <td>
                                            <div class="btn-group">
                                                <div data-toggle="dropdown" class="btn btn-primary btn-xs dropdown-toggle">操作 <span class="caret"></span>
                                                </div>
                                                <ul class="dropdown-menu">
                                                    <li><a onClick="add('{:url('member/levelAdd',['id'=>$v['id'],'url'=>-1])}')">修改</a>
                                                    </li>
                                                    {if $v.level>2}
                                                    <li class="divider"></li>
                                                    <li><a onclick="delById('member_level','{$v.id}')">删除</a></li>

                                                    </li>
                                                    {/if}
                                                </ul>
                                            </div>
                                        </td>
                                    </tr>
                                    {/volist}
                                </tbody>
                            </table>
                        </form>
                    </div>
                </div>
            </div>
            <hr>
            <div class="row row-lg">
                <div class="col-sm-12 pages">{$page|raw}</div>
            </div>
        </div>
    </div>
</div>
{include file="public/footer" /}
{load href="__STYLE__/admin/plugins/bootstrap/bootstrap-table.min.css"}
{load href="__STYLE__/admin/plugins/bootstrap/bootstrap-table.min.js"}
{load href="__STYLE__/admin/plugins/bootstrap/bootstrap-table-zh-CN.min.js"}
